﻿using Max.PH4_2102A.Shopping.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4_2102A.Shopping.IRespository
{
    /// <summary>
    /// 订单的仓储接口
    /// </summary>
    public interface IOrderMasterRespository
    {
        void Insert(OrderMasterEntity entity);

        /// <summary>
        /// 获取所有订单数据
        /// </summary>
        /// <returns></returns>
        IQueryable<OrderMasterEntity> GetAll();
    }

    /// <summary>
    /// 订单的明细仓储接口
    /// </summary>
    public interface IOrderDetailRespository
    {
        void Insert(OrderDetailEntity entity);
        void Insert(List<OrderDetailEntity> entities);


        /// <summary>
        /// 获取所有订单详情数据
        /// </summary>
        /// <returns></returns>
        IQueryable<OrderDetailEntity> GetAll();  //为什么返回用IQueryable，而不是List等
    }
}
